<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2019/7/24
 * Time: 16:43
 */

namespace app\common\model;


use think\Model;

class ConfigsModel extends Model
{
    protected $table = 'configs';
    protected $expire_time = 3600;

    /**
     * @param $cname
     */
    public function findByCname($cname){
        return $this->where(array('cname'=>$cname))->cache(true,$this->expire_time)->find();
    }
}